package com.chenchao.javaoop;

/**
 * @encoding : UTF-8
 * @Time : 2020/11/9 13:28
 * @Author : Chen Chao
 * @File : javaSE.com.chenchao.javaoop.Person.java
 * @Software : IntelliJ IDEA
 * @since : 1.8
 */
public class Person {
    public String name="bsv";
    public int age;

    public Person() {
    }

    public Person(String name, int age) {
        this.name = name;
        this.age = age;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    final public void setAge(int age) {
        this.age = age;
    }
    protected void sayHello(){
        System.out.println(this.getName()+"sayHello");
    }
    private  void sayNo(){
        System.out.println(this.getName()+"sayNo");
    }
}
